
//
//  TopViewController.m
//  OwnerNews
//
//  Created by lanou3g on 15/9/7.
//  Copyright (c) 2015年 Drawzyn. All rights reserved.
//

#import "TopViewController.h"

@interface TopViewController ()
@property (nonatomic,strong)UIWebView *webView;
@end

@implementation TopViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"%@",_KAURL);
    
    _webView = [[UIWebView alloc]initWithFrame:self.view.frame];
    NSURLRequest *request = [[NSURLRequest alloc]initWithURL:[NSURL URLWithString:_KAURL]];
    
    [self.view addSubview:_webView];
    
    [_webView loadRequest:request];
    
    UIBarButtonItem *left = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(ComeBackToController)];
    self.navigationItem.leftBarButtonItem = left;
    
}

-(void)ComeBackToController {
    for (UIView *v in [self.view subviews]) {
        [v removeFromSuperview];
    }
    
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
